package com.label.Model.Vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.label.Utils.Common.InfoUtil;
import lombok.Data;

@Data
public class SemeWarnVo {

    private Long semeWarnId;

    private String userId;

    private String warnLevel;

    private String helpUserId;

    private Long warnYear;

    private String warnSeason;

    private Long failCount;

    @JsonProperty("userName")
    private String getUserNameJSON() {
        if(userId!=null)
            return InfoUtil.getUserName(userId);
        return null;
    }

    @JsonProperty("helpUserName")
    private String getHelpUserNameJSON() {
        if(helpUserId!=null)
            return InfoUtil.getUserName(helpUserId);
        return null;
    }

}
